package com.washing.dao;

import com.washing.domain.SOrder;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.repository.query.Param;

import java.util.List;

public interface SOrderDao extends JpaRepository<SOrder, Long> {

    // 查询条件：UGUID等于给定值，OParentId等于0，OState大于-2
    List<SOrder> findByUGUIDAndOParentIdAndOStateGreaterThan(@Param("uguid") String uguid, @Param("parentId") int parentId, @Param("state") int state, PageRequest orderId);

    // 查询条件：OParentId等于给定值 或 OrderID等于给定值
    List<SOrder> findByOParentIdOrOrderId(@Param("parentId") Long parentId, @Param("orderId") Long orderId);
}
